package com.Beans.Models;

// Generated 17-jul-2014 23:52:14 by Hibernate Tools 3.4.0.CR1

import java.util.HashSet;
import java.util.Set;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import static javax.persistence.GenerationType.IDENTITY;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.OneToMany;
import javax.persistence.Table;

/**
 * Empleado generated by hbm2java
 */
@Entity
@Table(name = "empleado", catalog = "blitzdb")
public class Empleado implements java.io.Serializable {

	private Integer idEmpleado;
	private Area area;
	private String nombre;
	private String apellido;
	private String correo;
	private String user;
	private String password;
	private Set<Solicitud> solicituds = new HashSet<Solicitud>(0);

	public Empleado() {
	}

	public Empleado(Area area, String nombre, String apellido, String correo,
			String user, String password, Set<Solicitud> solicituds) {
		this.area = area;
		this.nombre = nombre;
		this.apellido = apellido;
		this.correo = correo;
		this.user = user;
		this.password = password;
		this.solicituds = solicituds;
	}

	@Id
	@GeneratedValue(strategy = IDENTITY)
	@Column(name = "idEmpleado", unique = true, nullable = false)
	public Integer getIdEmpleado() {
		return this.idEmpleado;
	}

	public void setIdEmpleado(Integer idEmpleado) {
		this.idEmpleado = idEmpleado;
	}

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "IdArea")
	public Area getArea() {
		return this.area;
	}

	public void setArea(Area area) {
		this.area = area;
	}

	@Column(name = "Nombre", length = 45)
	public String getNombre() {
		return this.nombre;
	}

	public void setNombre(String nombre) {
		this.nombre = nombre;
	}

	@Column(name = "Apellido", length = 45)
	public String getApellido() {
		return this.apellido;
	}

	public void setApellido(String apellido) {
		this.apellido = apellido;
	}

	@Column(name = "Correo", length = 45)
	public String getCorreo() {
		return this.correo;
	}

	public void setCorreo(String correo) {
		this.correo = correo;
	}

	@Column(name = "User", length = 45)
	public String getUser() {
		return this.user;
	}

	public void setUser(String user) {
		this.user = user;
	}

	@Column(name = "Password", length = 45)
	public String getPassword() {
		return this.password;
	}

	public void setPassword(String password) {
		this.password = password;
	}

	@OneToMany(fetch = FetchType.LAZY, mappedBy = "empleado")
	public Set<Solicitud> getSolicituds() {
		return this.solicituds;
	}

	public void setSolicituds(Set<Solicitud> solicituds) {
		this.solicituds = solicituds;
	}

}
